package com.huanying.goodjob.jobtype;

import java.io.Serializable;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;
import com.huanying.goodjob.skill.Skill;

@Entity
@Table(name = "jobtype")
public class Jobtype implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8714406550574846572L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private int id;

	private String name; // 标题
	@Column(name = "avgsalary", nullable = false, columnDefinition = "DOUBLE default 0")
	private double avgsalary; // 平均工资

	@Column(name = "status", nullable = false, columnDefinition = "INT default 1")
	private int status; // 状态
	/**
	 * 
	 */

	@OneToMany(mappedBy = "jobtype")
	@Transient
	private List<Skill> skills;

	public List<Skill> getSkills() {
		return skills;
	}

	public void setSkills(List<Skill> skills) {
		this.skills = skills;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public double getAvgsalary() {
		return avgsalary;
	}

	public void setAvgsalary(double avgsalary) {
		this.avgsalary = avgsalary;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

}
